package com.study.service.impl;

import com.study.dao.LendDao;
import com.study.service.LendService;

import java.util.List;

public class LendServiceImpl implements LendService {
    private LendDao lendDao;

    public LendDao getLendDao() {
        return lendDao;
    }

    public void setLendDao(LendDao lendDao) {
        this.lendDao = lendDao;
    }

    @Override
    public List selectBook(String readerId, int pageNow, int pageSize) {
        return lendDao.selectBook(readerId, pageNow, pageSize);
    }

    @Override
    public int selectBookSize(String readerId) {
        return lendDao.selectBookSize(readerId);
    }

    @Override
    public void addLend(Lend lend, Book book, Student student) {
        lendDao.addLend(lend, book, student);
    }

    @Override
    public Lend selectByBookId(String bookId) {
        return lendDao.selectByBookId(bookId);
    }

    @Override
    public Lend selectByBookISBN(String ISBN) {
        return lendDao.selectByBookISBN(ISBN);
    }
}
